學習目標
-
安裝Git
-
常用的命令列視窗指令
-
一些Git有用的設定
(因為我只有用Windows、MAC平台所以只有寫到兩種安裝方式)
安裝Git
https://git-scm.com/download

安裝於Windows作業系統


安裝於MAC作業系統




命令列視窗的常用指令
-
何謂命令列視窗(Command Prompt)=終端機(Terminal)
-
常用的命令
用途 |
Windows |
Mac |
建立新的目錄/資料夾 |
md目錄名 |
mkdit目錄名 |
切換到特定目錄 |
cd目錄名 |
cd目錄名 |
得知當前目錄為何 |
cd |
pwd |
列出當前目錄檔案列表 |
dir |
Is |
複製檔案 |
copy來源目的 |
cp來源目的 |
移動檔案 |
move來源目的 |
mv來源目的 |
更改檔名 |
ren舊名新名 |
mv舊名新名 |
刪除目錄/資料夾 |
rd目錄名 |
rmdir目錄名 |
刪除檔案 |
del檔案 |
rm檔案 |
清楚螢幕 |
cls |
clear |
重點整理
-
各平台如何安裝Git
-
Windows:下載安裝包>執行安裝精靈
-
Mac:下載安裝包>執行安裝精靈
-
常用的命令列視窗指令
-
目錄操作:md/mkdir、cd、cd/pwd、rd/rwdir
-
檔案操作:dir/Is、copy/cp、move/mv、ren/mv、del/rm
-
螢幕清理:cls/clear
-
一些常用的git設定
-
git config--global user.name "Robert Chi"
-
-
git config--global core.editor notepad
-
git config--global alias.cm "commit--amend-m"
-
git config--list